package tianxiao.web.test.common.exception;

/*
author: 张天笑 datetime: 2019/3/18 14:35
发生异常时, 只需要返回 code: 1, msg: e.message 的场景,
使用此异常
@see yun/web/test/common/GlobalExceptionHandlerImpl.java:38
*/
public class CommonException extends RuntimeException {
    public CommonException(String msg) {
        super(msg);
    }

    public static class CommonExceptionResult {

        public CommonExceptionResult(String msg) {
            this.message = msg;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        String message;
        int code = 1;
    }
}
